﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace Dreaming_of_Space_2
{
    public class SpaceTrace
    {
        public  int[,] way = { {873,672}, {270,670}, {630,500}, {864,330}, {860,97}, {536,260}, {404,241}, 
                                {350,295}, {197,366}, {25,660}};

       
        GraphicsPath myGraphicsPath3 = new GraphicsPath();

         public bool GetRandomTrace()
         {
            
             Random rnd = new Random();

             for (int i = 1; i < way.GetLength(0) - 1; i++)
             {
                 way[i, 0] = rnd.Next(1,920);
                 way[i, 1] = rnd.Next(1,700);
             }
                way[7, 0] = 350;
                way[7, 1] = 295;
                return true;
         }
       
        public void DrawWay(Graphics myGraphics) 
        {
            Point[] points = new Point[way.GetLength(0)];

            for (int i = 0; i < way.GetLength(0); i++)
            {
                points[i] = new Point(way[i, 0], way[i, 1]);

            }
            myGraphicsPath3.AddCurve(points);
           
            myGraphics.DrawPath(new Pen(Color.White, 1),
                                               myGraphicsPath3);
        }
    }
}
